#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <aclconio.h>
#include <define.h>
#include <transact.h>
#include <tran.h>
#include <gds.h>
#include <sizes.h>
#include "ConfProto.h"
#include "tblutil.h"
#include <\SOFTPAY\Ver30\source\include\sizes.h>
#include <\SOFTPAY\Ver30\HostSrc\citisrc\citiids.h>
#include <\SOFTPAY\Ver30\HostSrc\cpacsrc\cpacids.h>
#include <confio.h>

#include <\SOFTPAY\Ver30\source\include\LCT.h>

const char*LCTName = "LCT.dat";

static LCT_REC srLCTRec;

static int recordNum;
int	inLoadLCTRec (int inRecNumber)
{
	int inRet;

	inRet = inLoadConfRec(LCT_FILENAME, SIZE_LCT_REC, inRecNumber, (char *) &srLCTRec);

	recordNum = inRecNumber;
	return inRet;
}

void *pvdGetLCTRec(void)
{
	return &srLCTRec;

}

int	inSaveLCTRec (int inRecNumber)
{
	int inRet;

	inRet = inSaveConfRec(LCT_FILENAME, SIZE_LCT_REC, inRecNumber, (char *) &srLCTRec);

	return inRet;
}

int	inGetLCTRecNumber (void)
{
	return recordNum;
}

int	inUpdateLCTRec (void)
{
	int inRet;

	inRet = inSaveConfRec(LCT_FILENAME, SIZE_LCT_REC, recordNum, (char *) &srLCTRec);

	return inRet;
}

void	vdResetLCTRec (void)
{
	memset((void*)&srLCTRec, 0, REC_SIZEOF(srLCTRec));
}

char* szGetLanguageNamePrefix(void)
{
	return srLCTRec.szLanguageNamePrefix;
}

void vdSetLanguageNamePrefix(const char* szLanguageNamePrefix)
{
	strNumCopy(srLCTRec.szLanguageNamePrefix, szLanguageNamePrefix, sizeof(((LCT_REC*)NULL)->szLanguageNamePrefix)-1);
}

char* szGetLanguageNameFontBytes(void)
{
	return srLCTRec.szLanguageNameFontBytes;
}

void vdSetLanguageNameFontBytes(const char* szLanguageNameFontBytes)
{
	strNumCopy(srLCTRec.szLanguageNameFontBytes, szLanguageNameFontBytes, sizeof(((LCT_REC*)NULL)->szLanguageNameFontBytes)-1);
}

char* szGetReport1NamePrefix(void)
{
	return srLCTRec.szReport1NamePrefix;
}

void vdSetReport1NamePrefix(const char* szReport1NamePrefix)
{
	strNumCopy(srLCTRec.szReport1NamePrefix, szReport1NamePrefix, sizeof(((LCT_REC*)NULL)->szReport1NamePrefix)-1);
}

char* szGetReport2NamePrefix(void)
{
	return srLCTRec.szReport2NamePrefix;
}

void vdSetReport2NamePrefix(const char* szReport2NamePrefix)
{
	strNumCopy(srLCTRec.szReport2NamePrefix, szReport2NamePrefix, sizeof(((LCT_REC*)NULL)->szReport2NamePrefix)-1);
}

char* szGetClerkReportNamePrefix(void)
{
	return srLCTRec.szClerkReportNamePrefix;
}

void vdSetClerkReportNamePrefix(const char* szClerkReportNamePrefix)
{
	strNumCopy(srLCTRec.szClerkReportNamePrefix, szClerkReportNamePrefix, sizeof(((LCT_REC*)NULL)->szClerkReportNamePrefix)-1);
}

char* szGetShiftReportNamePrefix(void)
{
	return srLCTRec.szShiftReportNamePrefix;
}

void vdSetShiftReportNamePrefix(const char* szShiftReportNamePrefix)
{
	strNumCopy(srLCTRec.szShiftReportNamePrefix, szShiftReportNamePrefix, sizeof(((LCT_REC*)NULL)->szShiftReportNamePrefix)-1);
}

char* szGetFleetReportNamePrefix(void)
{
	return srLCTRec.szFleetReportNamePrefix;
}

void vdSetFleetReportNamePrefix(const char* szFleetReportNamePrefix)
{
	strNumCopy(srLCTRec.szFleetReportNamePrefix, szFleetReportNamePrefix, sizeof(((LCT_REC*)NULL)->szFleetReportNamePrefix)-1);
}

char* szGetTemplateFileNameSuffix(void)
{
	return srLCTRec.szTemplateFileNameSuffix;
}

void vdSetTemplateFileNameSuffix(const char* szTemplateFileNameSuffix)
{
	strNumCopy(srLCTRec.szTemplateFileNameSuffix, szTemplateFileNameSuffix, sizeof(((LCT_REC*)NULL)->szTemplateFileNameSuffix)-1);
}

short shGetFontType(void)
{
	return srLCTRec.shFontType;
}

void vdSetFontType(short shFontType)
{
	srLCTRec.shFontType = shFontType;
}

char* szGetActionFontName(void)
{
	return srLCTRec.szActionFontName;
}

void vdSetActionFontName(const char* szActionFontName)
{
	strNumCopy(srLCTRec.szActionFontName, szActionFontName, sizeof(((LCT_REC*)NULL)->szActionFontName)-1);
}

short shGetActionGridType(void)
{
	return srLCTRec.shActionGridType;
}

void vdSetActionGridType(short shActionGridType)
{
	srLCTRec.shActionGridType = shActionGridType;
}

char* szGetMenuFontName(void)
{
	return srLCTRec.szMenuFontName;
}

void vdSetMenuFontName(const char* szMenuFontName)
{
	strNumCopy(srLCTRec.szMenuFontName, szMenuFontName, sizeof(((LCT_REC*)NULL)->szMenuFontName)-1);
}

short shGetMenuGridType(void)
{
	return srLCTRec.shMenuGridType;
}

void vdSetMenuGridType(short shMenuGridType)
{
	srLCTRec.shMenuGridType = shMenuGridType;
}

short inGetCountryCode(void)
{
	return srLCTRec.inCountryCode;
}

void vdSetCountryCode(short inCountryCode)
{
	srLCTRec.inCountryCode = inCountryCode;
}

char* szGetMerchReportNamePrefix(void)
{
	return srLCTRec.szMerchReportNamePrefix;
}

void vdSetMerchReportNamePrefix(const char* szMerchReportNamePrefix)
{
	strNumCopy(srLCTRec.szMerchReportNamePrefix, szMerchReportNamePrefix, sizeof(((LCT_REC*)NULL)->szMerchReportNamePrefix)-1);
}

